WDV321 Advanced JavaScript
Dynamic Content - Drop Down Lists
The goals of this assignment:
- Demonstrate how to dynamically populate a select element using the document.write() technique
- Demonstrate how to dynamically populate a select element using the createElement() technique
- Demonstrate how to dynamically add an option to a select element
- Demonstrate how to dynamically change the options of a select element
Team Names
Team Name:
Instructions:
- Use document.write() and the teamNames array to populate the teamNames select element.
- When a team is selected display the selected name next to 'Team Name:'' on the page.
- When the Add Team Name button is clicked add the name entered in the textfield to the teamNames select element.
- The reset button should reset the fields to their original values.
Cookies or Candy?
Selected Product:
Instructions:
- Use the createElement() technique and the cookies array to populate the productDisplay select element.
- When a product is selected is selected, display the selected name next to 'Selected Product:'' on the page.
- Change the contents of the productDisplay based on which radio button is selected.
- The reset button should reset the fields to their original values.